package com.authority.result;

import java.util.List;
import java.util.Set;

import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

public class UserPrivilegeDTO {
	private Long id;
	private String name;
	private String code;
	private Long parentId;
	private Integer num;
	private String url;
	private Integer isLeaf;
	private Set<String> actionCodes = Sets.newHashSet();
	private List<UserPrivilegeDTO> children = Lists.newArrayList();
	private String icon;

	
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Set<String> getActionCodes() {
		return actionCodes;
	}

	public void setActionCodes(Set<String> actionCodes) {
		this.actionCodes = actionCodes;
	}

	public List<UserPrivilegeDTO> getChildren() {
		return children;
	}

	public void setChildren(List<UserPrivilegeDTO> children) {
		this.children = children;
	}
	
	public void addChildren(UserPrivilegeDTO dto){
		this.children.add(dto);
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(Integer isLeaf) {
		this.isLeaf = isLeaf;
	}
}
